// FrogEncryptDialog.h : Declaration of the CFrogEncryptDialog

#pragma once

#include "resource.h"       // main symbols
#include <atlhost.h>
#include "FrogProgressReportDialog.h"


// CFrogEncryptDialog

class CFrogEncryptDialog: public CFrogProgressReportDialog<CFrogEncryptDialog>,
	public CWinDataExchange<CFrogEncryptDialog>
{
public:
	CFrogEncryptDialog(HICON hIcon);

	enum { IDD = IDD_DIALOG_PASSWORD };

	bool m_DeleteFile;
	wstring m_Password;

	BEGIN_MSG_MAP(CFrogEncryptDialog)
		MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
		COMMAND_HANDLER(IDOK, BN_CLICKED, OnClickedOK)
		COMMAND_HANDLER(IDCANCEL, BN_CLICKED, OnClickedCancel)
		// FrogBaseDialog Inherited
		CHAIN_MSG_MAP(CFrogProgressReportDialog)
	END_MSG_MAP()

	BEGIN_DDX_MAP(CFrogEncryptDialog)
		DDX_TEXT(IDC_EDIT_PASSWORD, m_StrPassword)
		DDX_TEXT(IDC_EDIT_PASSWORD_VALID, m_StrPasswordAgain)
		DDX_CHECK(IDC_CHECK_DELETE_FILE, m_DeleteFile)
	END_DDX_MAP()

	// Handler prototypes:
	//  LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	//  LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
	//  LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);

	LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnClickedOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
	virtual void ExecuteCommand();

private:
	CString m_StrPassword;
	CString m_StrPasswordAgain;
};


